package com.csgc.wifi.storage.base

import android.os.Parcelable

interface IPreferences {

    fun containsKey(key: String): Boolean

    fun removeValueForKey(key: String)

    fun getBoolean(key: String, defValue: Boolean? = null): Boolean?

    fun setBoolean(key: String, value: Boolean)

    fun getInt(key: String, defValue: Int? = null): Int?

    fun setInt(key: String, value: Int)

    fun getLong(key: String, defValue: Long? = null): Long?

    fun setLong(key: String, value: Long)

    fun getFloat(key: String, defValue: Float? = null): Float?

    fun setFloat(key: String, value: Float)

    fun getDouble(key: String, defValue: Double? = null): Double?

    fun setDouble(key: String, value: Double)

    fun getByteArray(key: String, defValue: ByteArray?): ByteArray?

    fun setByteArray(key: String, value: ByteArray)

    fun getString(key: String, defValue: String? = null): String?

    fun setString(key: String, value: String)

    fun getStringSet(key: String, defValue: Set<String>? = null): Set<String>?

    fun setStringSet(key: String, value: Set<String>)

    fun <T : Parcelable> getParcelable(key: String, tClass: Class<T>): T?

    fun setParcelable(key: String, value: Parcelable)
}
